#tool-container {
  height: 100%;
  min-width: 128px;
  width: 128px;
  background-color: whitesmoke;
  transition: all 0.5s;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;

  &.collapsed {
    min-width: 48px;
    width: 48px;

    .tool-icon-btn {
      margin-left: -11px;

      .tool-title {
        opacity: 0;
        min-width: 0; // 搭配 margin-left: -10px; 使用
        // font-size: 0;
      }

      .tool-open-icon {
        display: block;
      }

      .tool-close-icon {
        display: none;
      }
    }
  }

  .tool-title {
    font-size: 20px;
    letter-spacing: 1px;
    padding: 10px;
    transition: all 0.5s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #333;
    opacity: 0.8;
    text-shadow: 1px 1px 3px #343a40;
    cursor: default;
    position: relative;

    &::after {
      content: '';
      position: absolute;
      width: 100px;
      height: 8px;
      top: 0;
      left: -100%;
      background-color: #f8f9fa;
      opacity: 0.66;
      transform: rotate(-45deg);
      animation: flashFlag 2s ease-in 2s infinite;
    }

    @keyframes flashFlag {
      0% {
        left: -100%;
        top: 0;
      }

      to {
        left: 100%;
        top: 0;
      }
    }
  }

  .tool-icon-btn {
    font-size: 24px;
    transition: all 0.5s;
    cursor: pointer;
    width: 100%;
    height: 48px;
    display: flex;
    justify-content: space-evenly;
    align-items: center;

    .tool-open-icon {
      margin-top: 2px;
      display: none;
    }

    .tool-close-icon {
      margin-top: 2px;
      display: block;
    }

    &:active {
      transform: scale(0.91);
    }
  }
}
